/* Copyright 2010 Michael Bruno
 *
 * This file is part of AYACE
 *
 * AYACE is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * at your option) any later version.
 *
 * AYACE is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with AYACE.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef CHESS_H
#define CHESS_H

#include <stdio.h>
#include <pthread.h>
#include "hash.h"
#include "bitboard/bitboard_movelist.h"

// award center squares the most value
#define sqrval(x) (2-ABS(((((x)+1)/2)-2)))


extern char *pname;
extern FILE *of;
extern pthread_mutex_t stdout_lock;
extern ttable_t ttable;
extern int engine_color;
extern int current_color;
extern int force;
extern int edit;

extern int trait_search_depth;
extern int trait_defensiveness;
extern int trait_offensiveness;
extern int trait_king_protectiveness;
extern int trait_king_attackiveness;
extern int trait_queen_protectiveness;
extern int trait_queen_attackiveness;

void move_t2mstr(char *mstr, move_t m);
int no_legal_moves(board_t *b, move_t *move_list, int move_count, int color);
int in_list(move_t *move_list, int move_count, move_t m, move_t *lm);


#endif

